package com.yuyue.dronesystem.entities;

import java.util.Objects;

/**
 * Box
 */
public class Box {

    private Integer id;
    private String name;
    private Double length;
    private Double width;
    private Double height;

    public Box() {
    }

    public Box(Integer id, String name, Double length, Double width, Double height) {
        this.id = id;
        this.name = name;
        this.length = length;
        this.width = width;
        this.height = height;
    }

    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getLength() {
        return this.length;
    }

    public void setLength(Double length) {
        this.length = length;
    }

    public Double getWidth() {
        return this.width;
    }

    public void setWidth(Double width) {
        this.width = width;
    }

    public Double getHeight() {
        return this.height;
    }

    public void setHeight(Double height) {
        this.height = height;
    }

    public Box id(Integer id) {
        this.id = id;
        return this;
    }

    public Box name(String name) {
        this.name = name;
        return this;
    }

    public Box length(Double length) {
        this.length = length;
        return this;
    }

    public Box width(Double width) {
        this.width = width;
        return this;
    }

    public Box height(Double height) {
        this.height = height;
        return this;
    }

    @Override
    public boolean equals(Object o) {
        if (o == this)
            return true;
        if (!(o instanceof Box)) {
            return false;
        }
        Box box = (Box) o;
        return Objects.equals(id, box.id) && Objects.equals(name, box.name) && Objects.equals(length, box.length) && Objects.equals(width, box.width) && Objects.equals(height, box.height);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, length, width, height);
    }

    @Override
    public String toString() {
        return "{" +
            " id='" + getId() + "'" +
            ", name='" + getName() + "'" +
            ", length='" + getLength() + "'" +
            ", width='" + getWidth() + "'" +
            ", height='" + getHeight() + "'" +
            "}";
    }
}